;(function(){
  'use strict';
  angular.module('services.resourcesWatchData.dbInfoView',[])
   .factory('DbInfoViewServer',dbInfoViewServer);

  function dbInfoViewServer(Restangular){
    return{
      getDBResource : getDBResource,
      dbInfoQuery : dbInfoQuery,
      dbUsageDetailQuery : dbUsageDetailQuery
    };

    function getDBResource(){
      return Restangular.one('sas/faultLocation/dbInfoView/dbQuery').get();
    }

    function dbInfoQuery(param,callback){
      return Restangular.all('sas/faultLocation/dbInfoView/dbInfoQuery').post(param).then(callback);
    }

    function dbUsageDetailQuery(param,callback){
      return Restangular.all('sas/faultLocation/dbInfoView/dbDetailQuery').post(param).then(callback);
    }
  }

  dbInfoViewServer.$inject = ['Restangular'];


})();